package com.nbsaas.boot.common.rest.convert;

import com.nbsaas.boot.common.data.entity.Component;
import com.nbsaas.boot.common.api.domain.request.ComponentRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 请求对象转换成实体对象
*/

public class ComponentEntityConvert  implements Converter<Component, ComponentRequest> {

    @Override
    public Component convert(ComponentRequest source) {
        Component result = new Component();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

